import { _decorator, Component, Node, tween, Vec3 } from 'cc';
import { GameMgr } from '../GameMgr';
import { EventMgr } from '../../EventMgr/EventMgr';
const { ccclass, property } = _decorator;

@ccclass('WinPanel')
export class WinPanel extends Component {
    start() {
        EventMgr.Inst.addEvent("GAME_WIN",this.showSelf,this);
    }
    showSelf(){
        tween(this.node)
        .to(1,{position:new Vec3(0,0,0)})
        .start();
    }
    protected onDestroy(): void {
        
        EventMgr.Inst.removeEvent("GAME_WIN",this.showSelf,this);
    }
}


